package com.lu.component.rpc.model.domain.response;

import java.io.Serializable;

/**
 * rpc请求响应
 *
 * @author: zhanglu
 * @date: 2023/8/17 16:09
 * @modify: 修改人信息, 修改内容 2023/8/17 16:09
 */
public class RpcResponse<T> implements Serializable {

  /**
   * 状态码
   */
  private Integer status;

  /**
   * 成功与失败
   */
  private boolean isOk;

  /**
   * 错误提示
   */
  private String errorMsg;

  public RpcResponse(Integer status, boolean isOk) {
    this.status = status;
    this.isOk = isOk;
  }

  public RpcResponse(boolean isOk, String errorMsg) {
    this.isOk = isOk;
    this.errorMsg = errorMsg;
  }

  public RpcResponse(Integer status, boolean isOk, String errorMsg) {
    this.status = status;
    this.isOk = isOk;
    this.errorMsg = errorMsg;
  }

  public Integer getStatus() {
    return status;
  }

  public void setStatus(Integer status) {
    this.status = status;
  }

  public boolean isOk() {
    return isOk;
  }

  public void setOk(boolean ok) {
    isOk = ok;
  }

  public String getErrorMsg() {
    return errorMsg;
  }

  public void setErrorMsg(String errorMsg) {
    this.errorMsg = errorMsg;
  }
}
